

<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>



<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>

<!-- Plugin JavaScript -->
<script src="http://cdn.bootcss.com/jquery-easing/1.4.1/jquery.easing.min.js"></script>

<script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>

<script src="__STATIC__/assets/addons/jquery_lazyload/jquery.lazyload.js"></script>


<script src="__STATIC__/assets/js/swiper.min.js"></script>
<script src="__STATIC__/assets/js/iscroll.js" ></script>
<script src="__STATIC__/assets/js/SuperSlide.js" ></script>
<script type="text/javascript" src="__STATIC__/assets/js/jquery.hoverdir.js"></script>
<!--手机端选择弹窗-->
<script src="__STATIC__/assets/js/common.js" ></script>
<script>
    $(function () {
        //初始化头部下拉
        var _this1=null;
        $('.nav_pc>li').hover(function(){
            _this1=$(this);
            _this1.find('.second_nav').width(_this1.width()).slideDown();
        },function(){
            _this1=$(this);
            _this1.find('.second_nav').hide();
        });


        navBarControl();

        $('#da-thumbs > li').hoverdir();
    });


    function navBarControl() {
        //设置表示当前导航栏
        var cur_url = window.location.href;
        //pc端
        var lis = $('.nav_pc > li');
        var  as = $('.nav_pc > li > a');
        var lastLi = null;
        for(i = 0,size = lis.length;i < size;i++)
        {
            if (i != 0)
            {
                $(lis[0]).removeClass('active');
            }
            console.log(cur_url.indexOf($(as[i]).attr('href')));
            if (cur_url.indexOf($(as[i]).attr('href')) != -1)
            {
                lastLi = $(lis[i]);
            }

            if ($(as[i]).attr('href') == 'javascript:;' && cur_url.indexOf('abroad') != -1)
            {
                console.log(cur_url.indexOf('abroad'));
                lastLi = $(lis[i]);
            }
        }

        if ($('.head_m_nav').css('display') == 'none')
        {
            lastLi.addClass('active');
            return;
        }
        lis = $('.m_nav_parent > li');
        as  = $('.m_nav_parent > li > a');
        as.removeClass('on');

        for(i = 0,size = lis.length;i < size;i++)
        {

            if (cur_url.indexOf($(as[i]).attr('href')) != -1)
            {
                lastLi = $(lis[i])
            }
            lastLi.addClass('on');

            if (cur_url.indexOf('abroad') != -1)
            {
                $('.footer-fixd-nav>li').removeClass('on');
                $('.footer-fixd-nav>#abroad').addClass('on');

            }

            if (cur_url.indexOf('gsz') != -1 || cur_url.indexOf('zsb') != -1 || cur_url.indexOf('bsy') != -1)
            {
                $('.footer-fixd-nav>li').removeClass('on');
                $('.footer-fixd-nav>#study').addClass('on');

            }

            if (cur_url.indexOf('jst') != -1 || cur_url.indexOf('rst') != -1 || cur_url.indexOf('wls') != -1|| cur_url.indexOf('tzs') != -1)
            {
                $('.footer-fixd-nav>li').removeClass('on');
                $('.footer-fixd-nav>#cert').addClass('on');

            }
        }


    }

    <!--界面逻辑-->
    function pc_submit() {
        $.post(
            '/admin/notebook/add',
            $('#pc_from').serialize(),
            function (data) {
                alert('保存成功！');
            })
    }
    function m_submit() {
        $.post(
            '/admin/notebook/add',
            $('#m_from').serialize(),
            function (data) {
                alert('保存成功！');
            })
    }



</script>